/*
 *    This file is part of BlobDB.
 *
 *    BlobDB is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation, either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    BlobDB is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with BlobDB.  If not, see <http://www.gnu.org/licenses/>.
 *    
 *    Copyright(c) 2011 Michael Kankkonen
 *    http://www.vnetcon.org
 */


package org.vnetcon.blobdb.database;

/**
 * If you want to keep track on what have happened in your BlobDB you
 * can implement this method. BlobDB will call this every time before
 * executing anything.
 * 
 */
public interface AuditTrailInterface {

	/**
	 * Called by BlobDB before executing update. If false is returned from
	 * this method the execution will stop there.
	 * 
	 * @param auditUser
	 * @param sql
	 * @return
	 */
	public boolean executingUpdate(String auditUser, String sql);

	/**
	 * Called by BlobDB before executing query. If false is returned from
	 * this method the execution will stop there.
	 * 
	 * @param auditUser
	 * @param sql
	 * @return
	 */
	public boolean executingQuery(String auditUser, String sql);
	
}
